package com.atguigu.cloud.controller;

import com.atguigu.cloud.apis.PayFeignApi;
import com.atguigu.cloud.resp.ResultData;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
public class OrderGateWayController {
    @Resource
    private PayFeignApi payFeignApi;

    @GetMapping("/feign/pay/gateway/get/{id}")
    public ResultData getPayInfoByGateway(@PathVariable("id") Integer id){
        return payFeignApi.getPayInfoByGateway(id);
    }

    @GetMapping("/feign/pay/gateway/get/info")
    public ResultData getInfoByGateway(){
        return payFeignApi.getInfoByGateway();
    }
}
